/**
 * ClassName: Java02_Object
 * Package: PACKAGE_NAME
 * DESCRIPTION:
 *
 * @Author 程翎钥
 * @Create 2024/3/22 15:34
 * @Version 1.0
 */
public class Java02_Object {
    public static void main(String[] args) {
        Animal a1 = new Animal();
        Animal a2 = new Animal();
        a1.type = "猫";
        a2.type = "狗";
        a1.name = "小黑";
        a2.name = "大黄";
        a1.act();
        a2.act();
    }
}
class Animal{
    String type;
    String name;
    void act() {
        System.out.println(name + type + "跑开了");
    }
}
